﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

/* Extension methods for Window class */
using Sovacode.RubiksCube.Common.View;

namespace Sovacode.DemoApp
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {

        public MainWindow()
        {
            /* Setting up DataContext of main window */
            DataContext = new ViewModel.ComplexViewModel
                              {
                                  /* Using extension methods to set up access to local settings file */
                                  SettingsManager = this.MakeSettingsManager<LocalSettings>(),

                                  /* Setting standart bad-practise window service for showing simple and modal dialogs.
                                   * You are free to use your own solution here.
                                   * The basic interface of Window Service is IWindowService
                                   * Possible, in next releases it will be changed.
                                   */
                                  WindowService = this.MakeWindowService()
                              };

            InitializeComponent();
        }
    }
}
